﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
	<head>
		<title>Mapa</title>
        <script src="http://maps.google.com/maps/api/js?sensor=true" type="text/javascript"></script>
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js" type="text/javascript"></script>
        <script src="jquery.ui.map.full.min.js" type="text/javascript"></script>
	</head>
	<body>
	    <div id="map"></div>
	</body>

    <script>
        $(document).ready(function() {
            $('#map').gmap({'center': '44.016521, 21.005859'});
        });
        function pozicioniraj(lat, lon, ocisti) {
            var position = new google.maps.LatLng(lat, lon);
            if (ocisti) {
                $('#map').gmap('clear', 'markers');
            }
            $('#map').gmap('option', 'zoom', 13);
            $('#map').gmap('addMarker', {'position': position, 'bounds': true});
        }
        
        function prikaziMe(lat, lon) {
            var position = new google.maps.LatLng(lat, lon);
            $('#map').gmap('clear', 'markers');
            $('#map').gmap('option', 'zoom', 13);
            $('#map').gmap('addMarker', { 'position': position, 'bounds': true, icon: 'profile.png' });
        }

        function prikaziInfo(naziv, vrsta, adresa, lat, lon, radnoVreme) {
            var position = new google.maps.LatLng(lat, lon);
            var content = '<h3 class="naziv">' + naziv + '</h3>' + '<p>' + vrsta + '</p>'+ '<p>' + adresa + '</p>' + '<p>' + radnoVreme + '</p>';
            $("#map").gmap('openInfoWindow', { 'content': content, 'position': position});
        }
        
        function ocisti() {
            $('#map').gmap('clear', 'markers');
        }
    </script>
    <style>
        #map
        {
            width: 800px;
            height: 600px;
        }
        .naziv, p
        {
            font-family: Sans-Serif;
            font-size: 10pt;
        }
        .naziv 
        {
            margin: 0; 
        }
        p 
        {
            font-size: 8pt;
            margin: 0;
        }
        
    </style>
</html>